import Vue from 'vue'
import Router from 'vue-router'

import Index from '@/page/Index'
import Test from '@/page/Test'

//丹------------------------------------

import LoginSum from '@/page/login/LoginSum'
import Login from '@/page/login/Login'
import Register from '@/page/login/Register'
import ForgotPwd from '@/page/login/ForgotPwd'
import Confirm from '@/page/login/Confirm'

import Platform from '@/page/platform/Platform'

import CouponList from '@/page/coupon/CouponList'
import ExamineCoupon from '@/page/coupon/ExamineCoupon'
import WriteOffCoupon from '@/page/coupon/WriteOffCoupon'
import GiftPackage from '@/page/coupon/GiftPackage'

import GoodShop from '@/page/shop/GoodShop'
import KTVShop from '@/page/shop/KTVShop'
import PrivateRoomDetail from '@/page/shop/PrivateRoomDetail'
import ShoppingMallDetail from '@/page/shop/ShoppingMallDetail'
import PackageAudit from '@/page/shop/PackageAudit'
import Comment from '@/page/shop/Comment'
import KTVOrder from '@/page/shop/KTVOrder'

import CouponManage from '@/page/ktvmanage/CouponManage'
import OrderWC from '@/page/ktvmanage/OrderWC'
import CouponCodeWC from '@/page/ktvmanage/CouponCodeWC'
import WCOrderList from '@/page/ktvmanage/WCOrderList'
import GoodsManage from '@/page/ktvmanage/GoodsManage'
import Classified from '@/page/ktvmanage/Classified'
import SetMealManage from '@/page/ktvmanage/SetMealManage'
import ReserveOrder from '@/page/ktvmanage/ReserveOrder'
import CancelReserveOrder from '@/page/ktvmanage/CancelReserveOrder'
import BaseMessage from '@/page/ktvmanage/BaseMessage'
import PrivateRoom from '@/page/ktvmanage/PrivateRoom'
import CommentManage from '@/page/ktvmanage/CommentManage'
import CouponClassified from '@/page/ktvmanage/CouponClassified'

///---宋-------------

import Verifi from '@/page/winning/Verifi'
import Cooperative from '@/page/cooperative/Cooperative'
import Role from '@/page/role/Role'
import Power from '@/page/role/Power'
import Winning from '@/page/winning/Winning'
import Prize from '@/page/winning/Prize'
import Rotation from '@/page/rotation/Rotation'

Vue.use(Router)

export default new Router({

  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      redirect: '/giftPackage',
      children: [
        //宋---------------------------------

        {
          path: '/verifi',
          name: 'verifi',
          component: Verifi,
        },
        {
          path: '/cooperative',
          name: 'cooperative',
          component: Cooperative,
        },
        {
          path: '/role',
          name: 'role',
          component: Role,
        },

        {
          path: '/power',
          name: 'power',
          component: Power,
        },

        {
          path: '/winning',
          name: 'winning',
          component: Winning,
        },
        {
          path: '/prize',
          name: 'prize',
          component: Prize,
        },

        {
          path: '/rotation',
          name: 'rotation',
          component: Rotation,
        },
        //丹---------------------------------------------------------------
        {
          path: '/platform',
          name: 'platform',
          component: Platform,
        },
        {
          path: '/couponList',
          name: 'couponList',
          component: CouponList,
        },
        {
          path: '/examineCoupon',
          name: 'examineCoupon',
          component: ExamineCoupon,
        },
        {
          path: '/writeOffCoupon',
          name: 'writeOffCoupon',
          component: WriteOffCoupon,
        },
        {
          path: '/giftPackage',
          name: 'giftPackage',
          component: GiftPackage,
        },
        {
          path: '/goodShop',
          name: 'goodShop',
          component: GoodShop,
        },
        {
          path: '/kTVShop',
          name: 'kTVShop',
          component: KTVShop,
        },
        {
          path: '/privateRoomDetail',
          name: 'privateRoomDetail',
          component: PrivateRoomDetail,
        },
        {
          path: '/shoppingMallDetail',
          name: 'shoppingMallDetail',
          component: ShoppingMallDetail,
        },
        {
          path: '/packageAudit',
          name: 'packageAudit',
          component: PackageAudit,
        },
        {
          path: '/comment',
          name: 'comment',
          component: Comment,
        },
        {
          path: '/kTVOrder',
          name: 'kTVOrder',
          component: KTVOrder,
        },
        {
          path: '/couponManage',
          name: 'couponManage',
          component: CouponManage,
        },
        {
          path: '/orderWC',
          name: 'orderWC',
          component: OrderWC,
        },
        {
          path: '/couponCodeWC',
          name: 'couponCodeWC',
          component: CouponCodeWC,
        },
        {
          path: '/wCOrderList',
          name: 'wCOrderList',
          component: WCOrderList,
        },
        {
          path: '/goodsManage',
          name: 'goodsManage',
          component: GoodsManage,
        },
        {
          path: '/classified',
          name: 'classified',
          component: Classified,
        },
        {
          path: '/setMealManage',
          name: 'setMealManage',
          component: SetMealManage,
        },
        {
          path: '/reserveOrder',
          name: 'reserveOrder',
          component: ReserveOrder,
        },
        {
          path: '/cancelReserveOrder',
          name: 'cancelReserveOrder',
          component: CancelReserveOrder,
        },
        {
          path: '/baseMessage',
          name: 'baseMessage',
          component: BaseMessage,
        },
        {
          path: '/privateRoom',
          name: 'privateRoom',
          component: PrivateRoom,
        },
        {
          path: '/commentManage',
          name: 'commentManage',
          component: CommentManage,
        },
        {
          path: '/couponClassified',
          name: 'couponClassified',
          component: CouponClassified,
        },

        // 江-----------------------------------------------------------------------------------
        //用户点赞商家列表
        {
          path: '/storeList',
          name: 'storeList',
          component:  resolve => require(['../page/store/StoreList'], resolve),
        },
        //消费者列表
        {
          path: '/clientList',
          name: 'clientList',
          component:  resolve => require(['../page/client/ClientList'], resolve),
        },
        //消费者消费次数
        {
          path: '/clientTimes',
          name: 'clientTimes',
          component:  resolve => require(['../page/client/ClientTimes'], resolve),
        },
        //消费者充值记录
        {
          path: '/clientCharge',
          name: 'clientCharge',
          component:  resolve => require(['../page/client/ClientCharge'], resolve),
        },
        //城市个人代理商列表
        {
          path: '/agentList',
          name: 'agentList',
          component:  resolve => require(['../page/agent/AgentList'], resolve),
        },
        //城市个人代理商申请
        {
          path: '/agentApply',
          name: 'agentApply',
          component:  resolve => require(['../page/agent/AgentApply'], resolve),
        },
        //城市个人代理商月收入
        {
          path: '/agentIncome',
          name: 'agentIncome',
          component:  resolve => require(['../page/agent/AgentIncome'], resolve),
        },
        //城市个人代理商扫码
        {
          path: '/agentCode',
          name: 'agentCode',
          component:  resolve => require(['../page/agent/AgentCode'], resolve),
        },
        //城市个人代理商充值
        {
          path: '/agentCharge',
          name: 'agentCharge',
          component:  resolve => require(['../page/agent/AgentCharge'], resolve),
        },
        //团队经理管理列表
        {
          path: '/managerList',
          name: 'managerList',
          component:  resolve => require(['../page/manager/ManagerList'], resolve),
        },
        //团队经理下地推人员列表
        {
          path: '/managerGround',
          name: 'managerGround',
          component:  resolve => require(['../page/manager/ManagerGround'], resolve),
        },
        //地推人员管理列表
        {
          path: '/groundList',
          name: 'groundList',
          component:  resolve => require(['../page/ground/GroundList'], resolve),
        },
        //商铺统计
        {
          path: '/statisticsShop',
          name: 'statisticsShop',
          component:  resolve => require(['../page/statistics/StatisticsShop'], resolve),
        },
      ]
    },
    {
      path: '/loginsum',
      name: 'loginsum',
      component: LoginSum,
      children: [
        {
          path: '/login',
          name: 'login',
          component: Login,
        },
        {
          path: '/forgotpwd',
          name: 'forgotpwd',
          component: ForgotPwd,
        },
        {
          path: '/confirm',
          name: 'confirm',
          component: Confirm,
        },
      ],
    },
    {
      path: '/register',
      name: 'register',
      component: Register,
    },
    {
      path: '/test',
      name: 'test',
      component: Test,
    },
  ]
})
